﻿<%@ Page AutoEventWireup="true" CodeBehind="Services.aspx.cs" Inherits="SLIITPro.Services"
    Language="C#" MasterPageFile="~/Home.Master" Title="Service" %>

<%@ Register Assembly="AjaxControlToolkit" Namespace="AjaxControlToolkit" TagPrefix="cc1" %>
<asp:Content ID="Content1" ContentPlaceHolderID="BodyContentPlaceHolder" runat="server">
    <div class="buttondiv">
        <asp:HyperLink ID="lblLocation" runat="server"></asp:HyperLink>
    </div>
    <asp:MultiView ID="MultiViewSearch" runat="server">
        <asp:View ID="vwLocation" runat="server">
            <table style="width: 40%" class="gridtable">
                <tr>
                    <td>
                        Country
                    </td>
                    <td>
                        <asp:DropDownList ID="ddlContry" runat="server" CssClass="droplist" Width="150px">
                        </asp:DropDownList>
                    </td>
                </tr>
                <tr>
                    <td>
                        City
                    </td>
                    <td>
                        <asp:TextBox ID="txtCity" runat="server" CssClass="droplist" Width="150px"></asp:TextBox>
                        <asp:RequiredFieldValidator ID="rfCity" runat="server" ControlToValidate="txtCity"
                            Display="Dynamic" ErrorMessage="Required" ValidationGroup="location"><img src="Images/InputError.png" alt="Required" /></asp:RequiredFieldValidator>
                    </td>
                </tr>
                <tr>
                    <td>
                        Street
                    </td>
                    <td>
                        <asp:TextBox ID="txtStreet" runat="server" CssClass="droplist" Width="150px"></asp:TextBox>
                        <asp:RequiredFieldValidator ID="rfStreet" runat="server" ControlToValidate="txtStreet"
                            Display="Dynamic" ErrorMessage="Required" ValidationGroup="location"><img src="Images/InputError.png" alt="Required" /></asp:RequiredFieldValidator>
                    </td>
                </tr>
                <tr>
                    <td colspan="2">
                        <div class="buttondiv">
                            <asp:Button ID="btnSetLocation" runat="server" CssClass="cssbutton" OnClick="btnSetLocation_Click"
                                Text="Submit" ValidationGroup="location" Width="75px" />
                        </div>
                    </td>
                </tr>
            </table>
        </asp:View>
        <asp:View ID="vwSearch" runat="server">
            <table class="gridtable">
                <tr>
                    <td>
                        <div style="padding: 5px 10px 5px 10px">
                            <asp:TextBox ID="txtSearch" runat="server" Width="350px"></asp:TextBox>
                            <asp:Button ID="btnSearch" runat="server" Text="Search" CssClass="droplist" Width="75px" /><div
                                id="list" />
                        </div>
                        <%-- <label for="q">
                            Search&nbsp;:&nbsp;</label>--%>
                    </td>
                    <td>
                        <asp:DropDownList ID="ddlSearchTerm" runat="server" CssClass="droplist" Width="150px">
                            <asp:ListItem Value="business">Business</asp:ListItem>
                            <asp:ListItem Value="location">Location</asp:ListItem>
                        </asp:DropDownList>
                    </td>
                </tr>
            </table>
            <h4 id="headsearch" runat="server" />
            <br />
            <asp:Label ID="lblMessage" runat="server"></asp:Label>
            <br />
            <asp:Repeater ID="RepeaterSearchResult" runat="server">
                <HeaderTemplate>
                    <table width="35%" class="gridtable">
                        <tr>
                            <th>
                                Business
                            </th>
                            <th>
                                Type
                            </th>
                        </tr>
                </HeaderTemplate>
                <ItemTemplate>
                    <tr>
                        <td>
                            <a href="Place.aspx?id=<%#DataBinder.Eval(Container.DataItem,"BId") %>">
                                <%#DataBinder.Eval(Container.DataItem, "BName")%></a>
                        </td>
                        <td>
                            <%#DataBinder.Eval(Container.DataItem, "BType")%>
                        </td>
                    </tr>
                </ItemTemplate>
                <FooterTemplate>
                    </table></FooterTemplate>
            </asp:Repeater>
        </asp:View>
    </asp:MultiView>
</asp:Content>
